<ul>
  <?php foreach ( $results as $key => $value ): ?>
    <li food_id="<?php echo $key ?>" quantity="<?php echo $value['quantity']; ?>"><?php echo $value['title']; ?></li>
  <?php endforeach; ?>
</ul>